<?php 
class web_admin
{ 
	function admin_web_set() 
	{ 
		global $mysql_conn,$v_file;
		$sql = "SELECT * from `web` WHERE `web_isset` = '1';";
		$result = mysql_query($sql,$mysql_conn);
		$row=mysql_fetch_array($result);
		$web_id = $row['web_id'];
		$web_bot = $row['web_bot'];
		$web_name = $row['web_name'];
		$web_url = $row['web_url'];
		$web_title = $row['web_title'];
		$web_keywords = $row['web_keywords'];
		$web_description = $row['web_description'];
		$web_company = $row['web_company'];
		$web_copyright = $row['web_copyright'];
		$web_isset = $row['web_isset'];
		$web_usertype = $row['web_usertype'];
		$web_glod = $row['web_glod'];
		$sql = "SELECT * from `user_type`";
		$result = mysql_query($sql,$mysql_conn);		
		while(@$row=mysql_fetch_array($result)) {
			$type_id = $row['type_id'];
			$type_name = $row['type_name'];
			$selected = "";
			if ($type_id == $web_usertype) $selected = "selected";
			$type_list .= "<option value='".$type_id."' ".$selected.">".$type_name."</option>";
		}

		require($v_file);
	}
	function admin_web_set_do() 
	{ 
		global $mysql_conn;
		$web_id = $_POST['web_id'];
		$web_bot = $_POST['web_bot'];
		$web_name = $_POST['web_name'];
		$web_url = $_POST['web_url'];
		$web_title = $_POST['web_title'];
		$web_keywords = $_POST['web_keywords'];
		$web_description = $_POST['web_description'];
		$web_company = $_POST['web_company'];
		$web_copyright = $_POST['web_copyright'];
		$web_usertype = $_POST['web_usertype'];
		$web_glod = $_POST['web_glod'];
		$sql = "UPDATE `web` SET `web_bot` = '".$web_bot."', `web_name` = '".$web_name."', `web_url` = '".$web_url."', `web_title` = '".$web_title."', `web_keywords` = '".$web_keywords."', `web_description` = '".$web_description."', `web_company` = '".$web_company."', `web_copyright` = '".$web_copyright."', `web_usertype` = '".$web_usertype."', `web_glod` = '".$web_glod."' WHERE `web_id` =".$web_id.";";
		$result = mysql_query($sql,$mysql_conn);
		@$row = mysql_fetch_array($result);
		echo "1";
	}
} 
/* End of file democontroller.php */ 